/**
 * 
 */
package edu.fjnu.fundsys.service.impl;

import java.util.List;

import edu.fjnu.fundsys.dao.AccountTransinfoDao;
import edu.fjnu.fundsys.dao.impl.AccountTransinfoDaoJDBCImpl;
import edu.fjnu.fundsys.domain.AccountTransinfo;
import edu.fjnu.fundsys.service.AccountTransinfoService;
import edu.fjnu.fundsys.utils.Page;

/**
 * @author BaiXiang
 *
 */
public class AccountTransinfoServiceImpl implements AccountTransinfoService {

	public void add(AccountTransinfo accounttransinfo) {
		// TODO Auto-generated method stub
		AccountTransinfoDao accountTransinfoDao = new AccountTransinfoDaoJDBCImpl();
		accountTransinfoDao.add(accounttransinfo);
	}

	public List<AccountTransinfo> loadAll() {
		// TODO Auto-generated method stub
		AccountTransinfoDao accountTransinfoDao = new AccountTransinfoDaoJDBCImpl();
		return accountTransinfoDao.loadAll();
	}

	public List<AccountTransinfo> loadByNo(Integer accountNo) {
		// TODO Auto-generated method stub
		AccountTransinfoDao accountTransinfoDao = new AccountTransinfoDaoJDBCImpl();
		return accountTransinfoDao.loadByNo(accountNo);
	}

	public Page loadPageInfo(Page page, Integer accountNo) {
		// TODO Auto-generated method stub
		AccountTransinfoDao accountTransinfoDao = new AccountTransinfoDaoJDBCImpl();
		page.setTotalRecNum(accountTransinfoDao.cntInfos(accountNo));
		page.setPageContent(accountTransinfoDao.getSelectInfos(accountNo, page.getStartIndex(), page.getEndIndex()));
		return page;
	}

}
